﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HeadFirst
{
    public abstract class Duck
    {
        protected QuackBehavior quackBehavior;
        protected FlyBehavior flyBehavior;

        public Duck() 
        {
        }

        public void performQuack() {
            quackBehavior.quack();
        }

        public void setQuackBehavior(QuackBehavior qb)
        {
            quackBehavior = qb;
        }

        public void performFly()
        {
            flyBehavior.Fly();
        }

        public void setFlyBehavior(FlyBehavior fb)
        {
            flyBehavior = fb;
        }

    }
}
